<template>
	<view class="page">
		<view class="zy-address-item" v-for="(item,index) in listData" :key="index" @click="navigateTo(item)" >
			<view class="list-item-column" >
				<view class="view1">
					{{item.twdmc}}
				</view>
				<view class="view2">
					<view class="">
						营业时间
					</view>
					<view class="" style="margin-left: 30rpx">
						{{item.yysj}}
					</view>
				</view>
				<view class="view2">
					<view class="">
						营业地址
					</view>
					<view class="" style="margin-left: 30rpx">
						{{item.details}}
					</view>
				</view>
				<view class="view3">
					{{item.biaoyu}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniList from '@/components/uni-list/uni-list.vue'
	import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
	import zyworkIcon from '@/components/zywork-icon/zywork-icon.vue'
	import * as ResponseStatus from '@/common/response-status.js'
	import {
		BASE_URL,
		USER_TOKEN_KEY,
		DEFAULT_HEADICON,
		showSuccessToast,
		showInfoToast,
		doGet,
		doPostJson,
		nullToStr,
		FRONT_BASE_URL,
		LOCAL_FILE_STORAGE,
		USER_SCHOOL
	} from '@/common/util.js'
	export default {
		components: {
			uniList,
			uniListItem,
			zyworkIcon
		},
		data() {
			return {
				location:"请选择你的学校",
				schoolIndex:0,
				listData:[],
				arraySchool:[],
				extraIcon: {
					color: '#0ac3e8',
					size: 80,
					type: 'iconwenjian'
				},
				schoolId:uni.getStorageSync(USER_SCHOOL)
			};
		},
		onLoad() {
			
		},
		onShow() {
			doGet("/graphic/any/list/" + this.schoolId, {}, {}, true).then(response => {
				let [error, res] = response;
				if (res.data.code === ResponseStatus.OK) {
					this.listData = res.data.data
				} else {
					showInfoToast(res.data.message);
				}
			}).catch(err => {
				console.log(err);
			})
		},
		methods:{
			navigateTo(item){
				uni.navigateTo({
					url:"/pages/print/outlet-print?id="+item.id
				})
			},
		}
	}
</script>

<style lang="scss">
	@import '@/common/zywork-main.scss';
	page{
		width: 100%;
		background-color: #eeeeee;
		height: 100%;
		padding-top: 30rpx;
	}
	
	
	.zy-row {
		@include flex-center-row;
		align-items: center;
	}
	
	.zy-phone{
		@include flex-center-column;
	}
	
	.list-item-column{
		@include flex-center-column;
		
		view{
			color: #FFFFFF;
		}
		.view1{
			padding: 8rpx 30rpx;
			font-size: $font-lg;
			font-weight: 800;
		}
		.view2{
			@include flex-center-row;
			padding: 8rpx 30rpx;
		}
		.view3{
			padding: 8rpx 30rpx;
			font-size: $font-lg;
		}
	}
	.zy-address-item{
		margin: 10rpx $padding-left-right;
		padding: 25rpx 0rpx;
		margin-bottom: 30rpx;
		width: 690rpx;
		// height: 250rpx;
		background: $base-color-btn;
		border-radius: 35rpx;
	}
	
	.slot-box {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		
	}
	.slot-text{
		color: #3b4144;
		font-size: $font-base;
	}
</style>
